#include "Can.h"


flexcan_data_info_t tx_info =
{
	FLEXCAN_MSG_ID_STD,	/*!< Type of message ID (standard or extended)*/
	8,					/*!< Length of Data in Bytes*/
	0					/*!< Specifies if the frame is standard or remote */
};

flexcan_data_info_t rx_info =
{
	FLEXCAN_MSG_ID_STD,	/*!< Type of message ID (standard or extended)*/
	8,					/*!< Length of Data in Bytes*/
	0					/*!< Specifies if the frame is standard or remote */
};


/***************************************************************************
* function prototypes / AUTOSAR API                                       
***************************************************************************/
void Can_Init( Can_ConfigPtrType *ConfigPtr )
{
    (void *)ConfigPtr;

    FLEXCAN_DRV_Init(INST_CANCOM, &canCom_State, &canCom_InitConfig0);
    FLEXCAN_DRV_ConfigRxMb(INST_CANCOM, 1, &rx_info, 0x0);
    FLEXCAN_DRV_SetRxMaskType(INST_CANCOM, FLEXCAN_RX_MASK_GLOBAL);
    FLEXCAN_DRV_SetRxMbGlobalMask(INST_CANCOM, FLEXCAN_MSG_ID_STD, 0x0);
}

Std_ReturnType Can_SetBaudrate( uint8 Controller, uint16 BaudRateConfigID )
{
    (void)Controller;
    (void)BaudRateConfigID;
}

Can_ReturnType Can_Write( Can_HwHandleType Hth, Can_PduInfoPtrType PduInfo )
{
    (void)Hth;
    (void*)PduInfo;
}

/* polling functions (always available for non polled systems also) */
void Can_MainFunction_Write( void )
{

}

void Can_MainFunction_BusOff( void )
{

}

void Can_MainFunction_Read( void )
{

}

void Can_MainFunction_Wakeup( void )
{

}

void CanBusOffInterrupt( void )
{

}

void CanMailboxInterrupt( void )
{

}

